﻿Public Class fSetProdej

    Private Sub fSetProdej_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Me.Seznam_ZpusobProdejeTableAdapter1.Fill(Me.DtbDataSet1.seznam_PrijemZpusobProdeje)
        '----------------loading data from seznam_typPlatby
        Dim fill As String = ""
        Try
            For i As Int16 = 0 To Me.DtbDataSet1.seznam_PrijemZpusobProdeje.Rows.Count() - 1
                fill = fill & Convert.ToString(i + 1) & ". " & Me.DtbDataSet1.seznam_PrijemZpusobProdeje.Rows.Item(i).Item(1) & vbCrLf
            Next i
            Me.tboxSeznamTypuProdeje.Text = fill
            fill = ""
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Critical, "Error when loading data")
        End Try
        '----------------end of loading data
    End Sub

    Private Sub btnZadaniTypuProdeje_Click(sender As System.Object, e As System.EventArgs) Handles btnZadaniTypuProdeje.Click
        My.Forms.fSetProdejDialog.ShowDialog()
    End Sub
End Class